// N1AutoreleasePool.h: interface for the N1AutoreleasePool class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_N1AUTORELEASEPOOL_H__861A724A_46D0_492B_BD4F_3A2DCE3AE93E__INCLUDED_)
#define AFX_N1AUTORELEASEPOOL_H__861A724A_46D0_492B_BD4F_3A2DCE3AE93E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "N1Lib.h"
#include "N1StaticVariable.h"

class NEXPORT N1AutoreleasePool : public N1Object {
    N1Variable<std::list<N1Object*> > m_list;

public:
    N1AutoreleasePool();
    virtual ~N1AutoreleasePool();

    void                       addObject(N1Object *obj);
    static N1AutoreleasePool*  defaultPool();
};

N1AutoreleasePool* N1DefaultPool();


#endif // !defined(AFX_N1AUTORELEASEPOOL_H__861A724A_46D0_492B_BD4F_3A2DCE3AE93E__INCLUDED_)
